#!/usr/bin/env bash
#下载docker 镜像
echo 'password'|docker login --username=hegaoye@qq.com -p hegaoye6258371 registry.cn-hangzhou.aliyuncs.com
docker pull registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888
docker pull registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:zookeeper-3.4.10
docker pull registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:redis-4.0.1
docker pull registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:mariadb-1.0
docker pull nginx
docker pull jenkins
docker pull adminer
docker pull rancher/server

#rancher
docker run -p 18080:8080 --name rancher --restart=always  -d rancher/server
doc

#mariadb
docker run -p 6033:3306 -e MYSQL_ROOT_PASSWORD=Jlb@201801001jinlanbao.Com --name mariadb --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:mariadb-1.0

#zookeeper
docker run -p 2181:2181 -p 3888:3888 -p 2888:2888 --name zookeeper --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:zookeeper-3.4.10

#nginx
docker run -p 80:80 -v /home/www:/home/www -v /etc/nginx/conf.d:/etc/nginx/conf.d --name nginx --restart always -d nginx
docker run -p 80:80 -v /home/tomcat-support:/home/tomcat-support -v /home/tomcat-support-api:/home/tomcat-support-api -v /home/tomcat-tutors:/home/tomcat-tutors -v /home/tomcat-tutors-api:/home/tomcat-tutors-api -v /home/tomcat-task:/home/tomcat-task  -v /home/ftpimg:/home/ftpimg -v /home/www:/home/www -v /etc/nginx/conf.d:/etc/nginx/conf.d --name nginx --restart always -d nginx

#adminer
docker run -p 18000:8080  --name adminer --restart always -d adminer

#jenkins
docker run -p 18888:8080 --name jenkins --restart always -d jenkins

#redis
docker run -p 2018:6379 -v /home/redis:/data --name redis --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:redis-4.0.1   redis-server /data/redis.conf

#tomcat
docker run  -v /home/tomcat-support/webapps:/usr/local/tomcat/webapps --name tomcat-support --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat-8.5
docker run -p 8082:8080  -v /home/tomcat-support-api/webapps:/usr/local/tomcat/webapps --name tomcat-support-api --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat-8.5
docker run -v /home/tomcat-tutors/webapps:/usr/local/tomcat/webapps --name tomcat-tutors --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat-8.5
docker run -p 8084:8080  -v /home/tomcat-tutors-api/webapps:/usr/local/tomcat/webapps --name tomcat-tutors-api --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat-8.5
docker run -p 8085:8080  -v /home/tomcat-task/webapps:/usr/local/tomcat/webapps --name tomcat-task --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat-8.5

docker run -p 2222:22  -v /home/tomcat-support/webapps:/usr/local/tomcat/webapps --name tomcat-support --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888
docker run -p 2223:22 -p 8082:8080  -v /home/tomcat-support-api/webapps:/usr/local/tomcat/webapps --name tomcat-support-api --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888
docker run -p 2224:22  -v /home/tomcat-tutors/webapps:/usr/local/tomcat/webapps --name tomcat-tutors --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888
docker run -p 2225:22 -p 8084:8080  -v /home/tomcat-tutors-api/webapps:/usr/local/tomcat/webapps --name tomcat-tutors-api --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888
docker run -p 2226:22 -p 8085:8080  -v /home/tomcat-task/webapps:/usr/local/tomcat/webapps --name tomcat-task --restart always -d registry.cn-hangzhou.aliyuncs.com/rzhkj/dev:tomcat8.5.20-ssh-888888


docker run --name pptp -d --privileged -p 1723:1723 -v /home/pptp/chap-secrets:/etc/ppp/chap-secrets --restart always  mobtitude/vpn-pptp
